package com.msmall.community.bbs.service;


import com.msmall.base.exception.AuthorityException;
import com.msmall.base.exception.DataNotFoundException;
import com.msmall.base.service.BaseManager;
import com.msmall.community.bbs.model.Thread;

public interface ThreadManager extends BaseManager<Thread, Long>{

	/**
	 * 1标题字符太少 2标题字符太多 3标题有非法字符 4内容字符太少 5内容字符太多 6内容有非法字符 7正常 8 请重新填写
	 * @param thread
	 * @param boardId
	 * @param topicId
	 * @param userAgentType
	 * @return
	 */
	public void saveThread(Thread thread, Long boardId, Long topicId,Long userid, String userAgentType);
	
	/**
	 * userid删除threadId
	 * @param threadId
	 * @param userid
	 * @throws AuthorityException 
	 * @throws DataNotFoundException 
	 */
	public void delete(Long threadId, Long userid) throws AuthorityException, DataNotFoundException;
	
	/**
	 * 验证thread content
	 * @return 1:正常；2字符太少；3字符太多;4含有非法字符
	 */
	public int validateThreadContent(String content);
}
